package com.heima.user.controller;

import com.heima.common.dtos.PageResult;
import com.heima.model.user.dtos.AuthDto;
import com.heima.model.user.dtos.UserAuthDto;
import com.heima.model.user.dtos.UserDto;
import com.heima.user.service.ApUserAuthService;
import com.heima.user.service.ApUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author RMY
 * @Date 2021/11/24 20:35
 * @Version 1.0
 */
@RestController
public class ApUserAuthController {
    @Autowired
    private ApUserAuthService apUserAuthService;

    /**
     * 分页查询用户认证信息
     * @param authDto
     * @return
     */
    @PostMapping("/api/v1/auth/list")
    public PageResult<UserAuthDto> loadListByStatus(@RequestBody AuthDto authDto){
        //调用service
        return apUserAuthService.loadListByStatus(authDto);
    }
}
